import request from "@/axios";

// 发布报价
export const releaseQuotation = option =>
  request({
    url: "/api/order/releasequotation",
    method: "post",
    data: option
  });

// 我的报价列表
export const getMyQuotation = option =>
  request({
    url: "/api/order/getmyquotationpage",
    method: "post",
    data: option
  });

// 我的报价明细
export const getMyQuotationDetail = option =>
  request({
    url: "/api/order/getmyquotationdetail",
    method: "get",
    params: option
  });

// 删除我的报价
export const delMyQuotation = option =>
  request({
    url: "/api/order/deletequotation",
    method: "post",
    data: option
  });

// 上架报价
export const ontheshelve = option =>
  request({
    url: "/api/order/ontheshelve",
    method: "post",
    data: option
  });

// 下架报价
export const offtheshelve = option =>
  request({
    url: "/api/order/offtheshelve",
    method: "post",
    data: option
  });

// 单个审核报价
export const auditQuotation = option =>
  request({
    url: "/api/order/auditquotation",
    method: "post",
    data: option
  });

// 批量审核报价
export const batchauditquotation = option =>
  request({
    url: "/api/order/batchauditquotation",
    method: "post",
    data: option
  });

// 获取待审核列表
export const getquotationtoaudit = option =>
  request({
    url: "/api/order/getquotationtoauditpage",
    method: "post",
    data: option
  });

// 待审核报价详情
export const getquotationdetailtoaudit = option =>
  request({
    url: "/api/order/getquotationdetailtoaudit",
    method: "get",
    params: option
  });

// 获取报价详情(编辑前查询)
export const getquotationdetailtoupdate = option =>
  request({
    url: "/api/order/getquotationdetailtoupdate",
    method: "get",
    params: option
  });

// 编辑报价
export const updatequotation = option =>
  request({
    url: "/api/order/updatequotation",
    method: "post",
    data: option
  });

// 修改库存
export const updatequotationamount = option =>
  request({
    url: "/api/order/updatequotationamount",
    method: "post",
    data: option
  });

// 修改升贴水
export const updatequotationpremium = option =>
  request({
    url: "/api/order/updatequotationpremium",
    method: "post",
    data: option
  });

// 修改价格
export const updatequotationprice = option =>
  request({
    url: "/api/order/updatequotationprice",
    method: "post",
    data: option
  });

// 获取报价总剩余库存
export const getamountavailabletotal = option =>
  request({
    url: "/api/order/getamountavailabletotal",
    method: "get",
    params: option
  });

// 批量获取报价剩余总库存
export const getamountavailabletotalbyids = option =>
  request({
    url: "/api/order/getamountavailabletotalbyids",
    method: "post",
    data: option
  });

// 现货商城报价
export const getquotations = option =>
  request({
    url: "/api/order/getquotationpage",
    method: "post",
    data: option
  });

// 现货商城报价详情
export const getquotationbyid = option =>
  request({
    url: "/api/order/getquotationbyid",
    method: "get",
    params: option
  });

// 相似报价
export const getsimilarquotation = option =>
  request({
    url: "/api/order/getsimilarquotation",
    method: "get",
    params: option
  });

// 获取所有商品属性
export const getcategoryattr = option =>
  request({
    url: "/api/datasupport/getcategoryattr",
    method: "get",
    params: option
  });

// 历史升贴水对比
export const verifyhistorypremium = option =>
  request({
    url: "/api/order/verifyhistorypremium",
    method: "post",
    data: option
  });

// 导出报价剩余数
export const exportquotationresiduals = option =>
  request({
    url: "/api/file/exportquotationresiduals",
    method: "get",
    params: option,
    responseType: "blob"
  });

// 查询线路
export const getline = option =>
  request({
    url: "/api/order/getline",
    method: "get",
    params: option
  });
